import request from '@/utils/request'

export function getOrderList (params:any) {
    return request({
        url: 'store.order/list',
        method: 'GET',
        params
    })
}

/**
 * 获取订单详细
 */
export function getOrderDetail (params:any) {
    return request({
        url: 'store.order/detail',
        method: 'GET',
        params
    })
}

// 调整价格
export function updateOrderPrice (data:any) {
    return request({
        url: `store.order/updatePrice`,
        method: 'PUT',
        data
    })
}

// 线下支付
export function orderOfflinePayment (data:any) {
    return request({
        url: `store.order/offlinePayment`,
        method: 'POST',
        data
    })
}

// 获取收货地址详细
export function getOrderAddressDetail (params:any) {
    return request({
        url: `store.order/getOrderAddressDetail`,
        method: 'GET',
        params
    })
}


// 修改收货地址
export function updateOrderAddress (data:any) {
    return request({
        url: `store.order/updateAddress`,
        method: 'PUT',
        data
    })
}
// 关闭订单
export function closeOrder (data:any) {
    return request({
        url: `store.order/closeOrder`,
        method: 'PUT',
        data
    })
}

// 订单核销
export function toOrderExtract (data:any) {
    return request({
        url: `store.order/orderExtract`,
        method: 'PUT',
        data
    })
}
// 订单取消审核
export function cancelOrder (data:any) {
    return request({
        url: `store.order/cancelOrder`,
        method: 'PUT',
        data
    })
}
// 备注
export function updateOrderRemark (data:any) {
    return request({
        url: `store.order/updateRemark`,
        method: 'PUT',
        data
    })
}

// 确定收货
export function receiptOrder (data:any) {
    return request({
        url: `store.order/receiptOrder`,
        method: 'PUT',
        data
    })
}




// 获取订单发货单
export function getOrderDeliveryDetail (params:any) {
    return request({
        url: `store.order/getOrderDeliveryDetail`,
        method: 'GET',
        params
    })
}

// 获取订单发货单
export function orderDelivery (data:any) {
    return request({
        url: `store.order/orderDelivery`,
        method: 'PUT',
        data
    })
}




